﻿using Loki.IoC;
using Loki.IoC.Registration;

namespace Luna.Connectors.ZohoCRM
{
    public class ConnectorInstaller : LokiContextInstaller
    {
        private static ConnectorInstaller zoho = new ConnectorInstaller();

        public static ConnectorInstaller Zoho
        {
            get { return zoho; }
        }

        public override void Install(IObjectContext context)
        {
            string zohoName = ConnectorType.ZohoCRM.ToString();

            context.Register(Element.For<ZohoCRMSettingsManager>());

            // context.Register(Element.For<IContactProvider>().Named(zohoName).ImplementedBy<ZohoCRMContactProvider>());

            /*context.Register(Element.For<IConnector>()
                .Named(zohoName)
                .ImplementedBy<ZohoCRMConnector>()
                .Overrides(Property<IConnector>.ForKey(x => x.Contacts).Value(zohoName)));*/
        }
    }
}